package com.soulgame.sms;

import android.app.Activity;

import com.soul.sdk.SGProxy;
import com.soul.sdk.constants.Constants;
import com.soul.sdk.plugin.pay.IPayCallBack;
import com.soul.sdk.plugin.pay.PayParams;
import com.soul.sdk.plugin.pay.PayPluginAdapter;

/**
 * @author lch
 * @version Create time：2017-3-14
 * @类说明：注意：插件类是通过无参构造器 反射实例化的{@link #PayProxy}，构造器不能带参数 所写插件 需要配置，配置文件 在 assets
 *                     下的 {@link Constants#PATH_SG_PLUGIN_CONFIG}
 */
public class SMSPayPlugin extends PayPluginAdapter {

	private Activity mActivity;

	public SMSPayPlugin() {
		this.mActivity = SGProxy.getInstance().getActivity();
		// 初始化
		SMSSdk.getInstance().init(mActivity, SGProxy.getInstance().getSDKParamsJSON(mActivity));

	}

	@Override
	public boolean isSupportMethod(String methodName) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void pay(Activity pActivity, PayParams pPayParams, IPayCallBack pPayCallBack) {

		SMSSdk.getInstance().pay(pActivity, pPayParams, pPayCallBack);

	}

	@Override
	public int getPayPluginType() {
		
		return Constants.PLUGIN_TYPE_SMS_PAY;
	}

}
